#!/bin/csh -f

#**************************************************************************
#**
#**    Copyright (c) 1995-1997 by ABKGroup, UCLA VLSI CAD Laboratory,
#**    UCLA Computer Science Department, Los Angeles, CA 90095-1596 USA,
#**    and by the Regents of the University of California.
#**    All rights reserved.
#**
#**    No portion of this file may be used, copied, or transmitted for
#**    any purpose, including any research or commercial purpose,
#**    without the express written consent of Professor Andrew B. Kahng,
#**    UCLA Computer Science Department, 3713 Boelter Hall, Los Angeles,
#**    CA 90095-1596 USA.   Any copy made of this file must include this
#**    notice.    ABKGroup and the Regents of the University of California
#**    retain title to all copies of this file and/or its compiled
#**    derivatives.
#**
#**************************************************************************/

set DIFF=/usr/bin/diff
set WC=/usr/bin/wc
set PROG=PlacementTest 

/bin/rm -f seeds.{in,out}

echo "------------  Running test 0..." > new.out
echo -n Running test 0...
${PROG}0.exe >> new.out
echo Ok
echo "------------  Running test 1..." >> new.out
echo -n Running test 1...
${PROG}1.exe >> new.out
echo Ok
echo "------------  Running test 2..." >> new.out
echo -n Running test 2...
${PROG}2.exe >> new.out
echo Ok
echo "------------  Running test 3..." >> new.out
echo -n Running test 3...
${PROG}3.exe >> new.out
echo Ok
echo "------------  Running test 4..." >> new.out
echo -n Running test 4...
${PROG}4.exe >> new.out
echo Ok
echo "------------  Running test 5..." >> new.out
echo -n Running test 5...
${PROG}5.exe >> new.out
cat out.xy >> new.out
echo Ok
echo "------------  Running test 6..." >> new.out
echo -n Running test 6...
${PROG}6.exe >> /dev/null
echo Ok
echo "------------  Running test 7..." >> new.out
echo -n Running test 7...
echo 0 > seeds.in
echo 1 >> seeds.in
${PROG}7.exe >>& new.out
echo Ok
#echo "------------  Running test 8..." >> new.out
#echo -n Running test 8...
#${PROG}8.exe >> new.out
#echo Ok

egrep -v "(Created|sec|Smart.*0.833333.*)" new.out > newout.notime
egrep -v "(Created|sec|Smart.*0.833333.*)" expected.out > expectedout.notime 
$DIFF newout.notime expectedout.notime > diffs.notime

echo " "
echo Differences from precomputed results
echo "  lines:  words:  bytes:    error log:"
$WC diffs.notime
